﻿using System;
using Framework.Poco;
using Shell.DomainDot;

namespace Framework.Domain
{
    /// <summary>
    /// 酒店创造者
    /// </summary>
    public class HotelCreator : DomainDotBase<Hotel>
    {
        public WithOne<FeaturedWedding> FeaturedWeddingBelonged { private get; set; }

        public WithOne<ChurchWedding> ChurchWeddingBelonged { private get; set; }

        public void FeaturedWeddingRelease()
        {
            this.FeaturedWeddingBelonged.Release();
            this.FeaturedWeddingBelonged.Submit();
        }

        public void ChurchWeddingRelease()
        {
            this.ChurchWeddingBelonged.Release();
            this.ChurchWeddingBelonged.Submit();
        }

        public void BindFeaturedWedding(Guid featuredWeddingIdentity)
        {
            this.FeaturedWeddingBelonged.Bind(featuredWeddingIdentity);
            this.FeaturedWeddingBelonged.Submit();
        }

        public void BindChurchWedding(Guid churchWeddingIdentity)
        {
            this.ChurchWeddingBelonged.Bind(churchWeddingIdentity);
            this.ChurchWeddingBelonged.Submit();
        }
    }
}
